package com.homework2;

import java.util.Collections;
import java.util.HashSet;
import java.util.Scanner;

public class Test08 {
    public static void main(String[] args) {
        HashSet<Integer> hashSet = new HashSet<>();
        int sum=0;
        int count=0;
        boolean flag=true;
        while (flag){
            Scanner scanner = new Scanner(System.in);
            int input= scanner.nextInt();
            if(input!=-1){
                Collections.addAll(hashSet,input);
                count++;
            }
            if(input==-1){
                flag=false;
            }
        }
        for (Integer integer : hashSet) {
            sum+=integer;
        }
        System.out.println("总分为:"+sum);
        System.out.println("平均分:"+sum/count);

    }
}
